import axios from "axios";
const  module={
  namespaced:true,
  state: {
    bannerList:[],
  },
  mutations: {
    setBannerList(state, list) {
        state.bannerList = list;
      },
  },
  //处理异步操作
  actions: {
      //获取banner
      getBannerList(store){
        axios({
          url: "/api/common/banners?terminalType=H5&channel=RECOMMEND",
        }).then((res) => {
          store.commit("setBannerList",res.data);
        });
      },
  }
}
export default module;